Skip to content

[FIX] Capture-Inversion False Positives Block open_kitchen on All-Truthy Configs#4188

Merged
Trecek merged 5 commits into
developfrom
capture-inversion-detection-false-positives-block-open-kitch/4184
Jul 5, 2026
Merged

[FIX] Capture-Inversion False Positives Block open_kitchen on All-Truthy Configs#4188
Trecek merged 5 commits into
developfrom
capture-inversion-detection-false-positives-block-open-kitch/4184

Conversation

@Trecek

@Trecek Trecek commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

The capture-inversion-detection rule produces false positives for context variables that have an unconditional capture-producer dominating every path to the reader. The rule checks whether the variable appears in the conditional fact domain but never verifies whether an unconditional producer is a strict dominator of the reader — a dominance check its sibling rule event-scope-requires-upstream-capture approximates (via backward reachability, which is sufficient for that rule's single-producer-near-entry pattern but insufficient for the general case here). These false positives were masked for weeks by filter_pruning_false_positives, which has two structural weaknesses: (1) its arming condition disarms on all-truthy configs (the healthiest scenario), and (2) the pre-prune baseline is structurally blind for this rule because bypass edges dilute the BFS fact intersection. A secondary defect — silent [:3] truncation of validation errors — hid 4 of 7 findings from the operator. The immunity plan addresses all four root causes (R1–R4) with architectural changes that make the bug class impossible and instantly surfaced.

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/remediation-20260705-091550-099403/.autoskillit/temp/rectify/rectify_capture_inversion_false_positives_2026-07-05_091550.md

Closes #4184

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
rectify* opus[1m] 1 61 22.0k 1.2M 106.6k 46 93.7k 31m 31s
review_approach* opus[1m] 1 24 6.8k 253.9k 65.1k 12 50.3k 9m 4s
dry_walkthrough* opus 1 2.9k 11.7k 1.8M 100.7k 60 81.5k 7m 34s
implement* MiniMax-M3 1 107.2k 21.2k 9.6M 0 153 0 9m 17s
assess* opus[1m] 1 93 19.7k 5.5M 115.9k 128 96.6k 16m 41s
audit_impl* opus[1m] 1 10 2.7k 92.1k 92.1k 37 3.0k 12m 42s
prepare_pr* MiniMax-M3 1 50.5k 1.9k 235.5k 0 12 0 30s
compose_pr* MiniMax-M3 1 42.0k 1.2k 214.3k 0 9 0 26s
review_pr* opus[1m] 1 42 28.0k 1.1M 114.4k 37 95.6k 17m 16s
resolve_review* opus[1m] 1 576 11.4k 2.4M 106.0k 63 87.3k 9m 6s
Total 203.5k 126.6k 22.3M 115.9k 507.9k 1h 54m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
rectify 0
review_approach 0
dry_walkthrough 0
implement 238 40242.6 0.0 88.9
assess 570 9643.8 169.5 34.5
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 37 65097.6 2358.9 309.2
Total 845 26426.1 601.1 149.8

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 6 806 90.6k 10.5M 426.5k 1h 36m
opus 1 2.9k 11.7k 1.8M 81.5k 7m 34s
MiniMax-M3 3 199.8k 24.3k 10.0M 0 10m 12s

Trecek and others added 5 commits July 5, 2026 11:45
- Fix non-dominating producer test: split routing targets so conditional
  edge facts don't mask the dominance check through set-based edge collapse
- Update schema version allowlist: tools_kitchen.py lines shifted +5
- Fix eval recipes: remove dead captures, add L3 sentinel to stop messages
- Fix list_recipes test: explicitly set _ctx=None to prevent xdist state leak

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ow compliant)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…erage

- tests/recipe/test_bundled_recipes_all_truthy.py: add _default_overrides()
  helper and test_bundled_recipe_validates_with_default_ingredients to guard
  the complementary non-truthy/pruned configuration path
- tests/fleet/test_fleet_error_count_surfacing.py: new file covering the
  fleet-path combined-overflow computation in _run_dispatch
  (5+5 → "+4 more errors", exactly 6 → no indicator)
- tests/fleet/AGENTS.md + tests/recipe/AGENTS.md: document new/updated files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Trecek Trecek force-pushed the capture-inversion-detection-false-positives-block-open-kitch/4184 branch from 00f91af to 7c68f9b Compare July 5, 2026 18:45
@Trecek Trecek added this pull request to the merge queue Jul 5, 2026
Merged via the queue into develop with commit 18e10d9 Jul 5, 2026
3 checks passed
@Trecek Trecek deleted the capture-inversion-detection-false-positives-block-open-kitch/4184 branch July 5, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant